﻿namespace InternetSpiderLib.Scenes.UrlClassifications
{
    public class SelectUrlClassification : ListUrlClassification
    {
        public override UrlClassificationInfo ClassificationInfoUrl(string url)
        {
            foreach (var item in UrlClassifications ?? new IUrlClassification[0])
            {
                var classInfo = item.ClassificationInfoUrl(url);
                if (classInfo != null && classInfo.ClassificationType != UrlClassificationType.None)
                    return classInfo;
            }

            return null;
        }
    }
}
